#include <stdio.h>
int main()
{
    #define LEN 1024
    char level[LEN] = {0};
    char output[LEN] = {0};
    char pattern[LEN] = {0};

    const char* s = "info=stdout,stderr,/tmp/1/log{[%36N, %F] <%D><%M><%03T>%06L : info  -> %P}";

    const char* str_sscanf = "%4[^=]=%4[^{]{%4[^}]}";
    int n = sscanf(s, str_sscanf, 
            level, output, pattern);

    printf("n = %d\n", n);
    printf("%10s = %s\n", "level", level);
    printf("%10s = %s\n", "output", output);
    printf("%10s = %s\n", "pattern", pattern);

    return 0;
}
